Inside the Gameboy Camera “Eyeball”
by Arthur Ed LeBouthillier
This article appeared in the June 1999 issue of The Robot Builder.
Introduction
Nintendo, the company that makes such entertainment machines as the Nintendo 64, also makes the Gameboy, a
small handheld entertainment system which accepts a wide array of different game cartridges. It has proven to be very popular over the last several years. To accompany the Gameboy, Nintendo released the Gameboy Camera, which is a small eye-ball sized camera mounted on top of a game cartridge with an optional printer. When plugged into the Gameboy, the camera takes medium-resolution pictures of 128 X 123 pixels and supports a wide variety of graphic processing capability with the ROM chip included in the camera cartridge.
The Gameboy Camera is based on the Mitsubishi M64282FP Artificial Retina, a single-chip CMOS imager chip with built-in image processing. Mitsubishi calls the chip an artificial retina because of the ability to perform such image processing functions as edge enhancement just like it is believed that the human retina does. Included in the chip
are the pixel array, the processing functions and the logic control functions. Because of its design, it can be interfaced to a microprocessor which has an analog-to-digital converter without any additional active components. The only additional parts that may be required are biasing resistors to ensure that the analog video output is within a suitable range for the A/D converter.
Figure 1
This chip has lots of potential for robotics hobbyists who would like to add vision to their robots because it is readily available by removing the camera from the Gameboy Camera cartridge (available for about $50.00 at toy stores) and because it is easily eyeball” camera interfaced to most popular microcontrollers which have built-in analog-to-digital converters.
The Mitsubishi Artificial Retina Chip At the heart of the Gameboy camera is Mitsubishi’s Artificial Retina Chip. It is a
16-pin clear-plastic IC and operates from a single 5-volt power supply. The chip provides seven image-processing functions including the positive image, the negative image, a couple of 1-D filtering modes and two 2-D filtering modes for edge enhancement and edge extraction.
Figure 2 shows the block diagram of the chip. The chip is controlled with a few 5- volt level logic signals and outputs an analog voltage on pin 14, Vout. The main clock signal is XCK which Mitsubishi specifies as being a maximum of 500 KHz although they don’t specify any minimum. With a 500 KHz clock, the chip outputs about 30 frames per second.
However, Mitsubishi has said that the chip can be clocked at lower rates meaning that you can drive the clock at the rate of your microcontroller’s analog-to-digital conversion. This is one of the neatest features of this chip; you can capture images with microcontrollers that might ordinarily be too slow to capture regular video. In some applications, you can probably minimize the memory you need by ignoring the pixels that you aren’t interested in.
There are eight 8-bit registers which control all aspects of the chips operations. Data for each of these registers is shifted in serially via the SIN (serial in) synchronized with the XCK (clock) and latched with the LOAD signal. The serial data consists of eleven bits of data, three bits for the address and eight bits for the data. The registers
configure image capture with the chip. Two 8-bit registers combine to form a 16-bit register designating the exposure time in clock pulses. Other registers control the image gain, the kind of image processing performed, the output voltage offset, the dark threshold, the degree of edge enhancement, and a few other parameters.
The video output signal is a 2 volt peak-to-peakvalue which can be offset by 1 volt in the positive range, thus giving 0 to 2 volts output. The pixel voltages are output row by row at each clock pulse once the READ signal goes high.
This is not the same as standard video. The only synchronization signal is the XCK signal which you generate;
therefore, you control the rate at which the data is transferred.
Operation
After the registers are loaded, the START signal initiates continuous image capture. After the number of clock pulses specified for image exposure, the READ signal goes high and the analog values for the pixels appear on the VOUT pin, with each successive pixel voltage appearing in synchronization with each clock pulse. Since your
processor generates the clock signals, it controls the rate of image capture and data transfer.
The Gameboy Camera “Eyeball”
Nintendo’s Gameboy camera brings the pins of the Mitsubishi Artificial Retina chip to a 9-pin connector of odd metric size (visible at the bottom of figure 1). Table 1 shows the functions of these pins. The Gameboy Camera “Eyeball” is a ready-made unit for your use. It physically houses the chip, provides the optics and brings the signals to a connector. You will probably want to replace the connector with one which is more widely available.
The Gameboy Camera is easily disassembled, resulting in the pieces shown in figure 3. The main circuit board contains 128 K of battery-backed RAM, 1 Meg of ROM and what appears to be a complex programmable logic device (CPLD) to control all of the signals. Because the full function of the proprietary chip has not been identified, it is not known whether the camera might more easily be controlled through the card-edge connector than by talking directly to the artificial retina chip. However, since documentation is available for the retina chip, it seems easy enough to interface directly to it.
Summary
This has been a quick overview of the Gameboy Camera “eyeball” and the Mitsubishi M62482FP Artificial Retina chip. It shows that a cheap, readily-interfaceable camera suitable for hobby robotics is available from local toy stores. It offers great possibilities for robotics hobbyists because it provides a state-of-the-art CMOS imager with built- in image processing. In the future, I will report on my experiences with using this chip.